# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=sagetex
pkgver=3.6.1
pkgrel=3
pkgdesc='Allows to embed code, results of computations, and plots from SageMath into LaTeX documents'
arch=(any)
url='https://github.com/sagemath/sagetex'
license=(GPL2)
depends=(sagemath texlive-core)
makedepends=(python-build python-installer python-wheel)
source=(https://github.com/sagemath/sagetex/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('c05f5c6470afdede829d9f9ff10a6bbe9452e5af130d4a14a4b3bc1238f140f4')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
